/**
 * JAVACC DEMO 1.0
 */
package com.apache.portal.thread;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * description:  定时获取专厅信息
 *
 * @author Hou Dayu 创建时间：2016-12-29
 */
public class UtrSessionSchedulerJob implements ISchedulerJob {

    private Logger log = LoggerFactory.getLogger(UtrSessionSchedulerJob.class);

    public void run() {
        //		File filePath = new File(ToolsUtil.getClassLoaderPath().replaceAll("WEB-INF/classes/", "") + "js/utr/");
        //		Map<String, Object> bodyMap = new HashMap<String, Object>();
        //		String sysPass = ConfigUtil.getInstance().interfacePass();
        //		bodyMap.put("sysPass", sysPass);
        //		List<UtrSession> list = UtrCoreClient.getInstance().findSessionInfos(bodyMap);
        //		if (null != list && list.size() > 0) {
        //			//int zcNum = 0;
        //			//int ztNum = 0;
        //			JSONArray jary = new JSONArray();
        //			for (UtrSession session : list) {
        //				JSONObject nvo = new JSONObject();
        //				nvo.put("id", session.getSessionid());
        //				nvo.put("name", session.getSename());
        //				if ("0".equals(session.getSessType())) {
        //					//	zcNum = zcNum + 1;
        //					nvo.put("type", "zc");
        //				} else {
        //					//	ztNum = ztNum + 1;
        //					//	nvo.put("name", "专厅" + ztNum);
        //					nvo.put("type", "zt");
        //				}
        //				jary.add(nvo);
        //			}
        //			try {
        //				FileOutputStream fo = new FileOutputStream(filePath + "/session.js");
        //				OutputStreamWriter osw = new OutputStreamWriter(fo, "UTF-8");
        //				PrintWriter out1 = new PrintWriter(osw);
        //				out1.println("var arrtInfo=" + jary.toString());
        //				out1.close();
        //				osw.close();
        //				fo.close();
        //			} catch (Exception e) {
        //				log.error("生成文件[session.js]出错ERROR KEY:" + e.getMessage());
        //			}
        //		}
    }
}
